<%@ page import="sistema.Produto" %>

<table id="newspaper-a" summary="2007 Major IT Companies' Profit">
  <thead>
    <tr>
      <th scope="col">Cod Barra</th>
      <th scope="col">Categoria</th>
      <th scope="col">Cor</th>
      <th scope="col">Modelo</th>
      <th scole="col">Fabricante</th>
      <th scope="col">Total</th>
      <th scope="col">Custo Real</th>
      <th scope="col">Custo Virtual</th>
      <th scope="col">Custo Atacado</th>
      <th scope="col">Custo Varejo</th>
      <th scope="col">Venda Sugerido</th>
    </tr>
  </thead>
  <tbody>
    
  <g:hiddenField name="codBarra" value=""/>
  <g:hiddenField name="categoria" value=""/>
  <g:hiddenField name="cor" value=""/>
  <g:hiddenField name="modelo" value=""/>
  <g:hiddenField name="custoReal" value=""/>
  <g:hiddenField name="custoAtacado" value=""/>
  <g:hiddenField name="custoVarejo" value=""/>
  <g:hiddenField name="custoSugerido" value=""/>
  <g:hiddenField name="fabricante" value=""/>
  <g:hiddenField name="estoque" value=""/>
  <g:hiddenField name="custoVirtual" value=""/>
 

  <g:each in="${lst}">
    <tr>
    <g:hiddenField name="codBarra" value="${it.codBarra}"/>
    <g:hiddenField name="categoria" value="${it.categoria}"/>
    <g:hiddenField name="cor" value="${it.cor}"/>
    <g:hiddenField name="modelo" value="${it.modelo}"/>
    <g:hiddenField name="custoVirtual" value="${it.custoVirtual}"/>
    <g:hiddenField name="custoAtacado" value="${it.custoAtacado}"/>
    <g:hiddenField name="custoVarejo" value="${it.custoVarejo}"/>
    <g:hiddenField name="custoSugerido" value="${it.custoSugerido}"/>
 

    <td>${it.codBarra}</td>
    <td>${it.categoria}</td>
    <td>${it.cor}</td>
    <td>${it.modelo}</td>
    <td><g:select style="width: 180px" value="${it.fabricante?.id}" noSelection="['':'-Escolha o Fabricante-']" id="fabricante" name="fabricante" from="${sistema.Fabricante.list()}" optionKey="id"/></td>
    <td><g:field type="text" name="estoque" value="${it.estoqueQtd}"/></td>
    <td style="text-align: right"><g:field type="text" name="custoReal" value="${it.custoReal}"/></td>
    <td style="text-align: right"><g:moeda valor="${it.custoVirtual}"/></td> 
    <td style="text-align: right"><g:moeda valor="${it.custoAtacado}"/></td>
    <td style="text-align: right"><g:moeda valor="${it.custoVarejo}"/></td>
    <td style="text-align: right"><g:moeda valor="${it.custoSugerido}"/></td>
    </tr> 
  </g:each>
</tbody>
</table>